/**
 * Copyright (c) 2023 Huawei Technologies Co.,Ltd.
 */
@use 'sass:math';
@use './color.scss' as *;
@use 'sass:map';

// page-header
.page-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding-bottom: 7px;
    border-bottom: 1px solid var(--border-1);

    .icon {
        width: 4px;
        height: 14px;
        background: var(--primary-6);
        border-radius: 1px;
        margin-right: 4px;
    }

    .title {
        font-family: 'Source Han Sans CN';
        font-style: normal;
        font-weight: 700;
        font-size: 16px;
        line-height: 22px;
        height: 22px;
        /* identical to box height, or 138% */
        letter-spacing: -0.01px;
        color: var(--text-1);
    }

    .seperator {
        margin: 0px 16px;
        width: 18px;
        height: 0px;
        border: 1px solid var(--border-1);
        transform: rotate(90deg);
    }

    .alert-title {
        height: 22px;
        font-family: 'Source Han Sans CN';
        font-style: normal;
        font-weight: 400;
        font-size: 14px;
        line-height: 22px;
        color: var(--text-1);
    }

    .alert-seperator {
        height: 22px;
        font-family: 'Source Han Sans CN';
        font-style: normal;
        font-weight: 400;
        font-size: 14px;
        line-height: 22px;
        color: var(--text-2);
    }
}

.form-header {
    border-radius: 2px;
    background: var(--background-color-4);
    margin-top: 16px;
    margin-bottom: 12px;
    height: 36px;

    .el-descriptions {
        padding: 7px 8px;
    }
}

.rule {
    border-radius: 2px;
    border: 1px solid var(--border-rule);
    background: var(--background-color-rule);
}

// card margin bottom
.card-margin-bottom {
    margin-bottom: 16px;
}

.card-links {
    .el-link {
        margin-right: 10px;
    }
}

// tabs in card
.card-tabs {
    &.el-tabs {
        --el-tabs-header-height: 32px;

        >.el-tabs__header {
            .el-tabs__item {
                padding: 0px 16px !important;
            }
        }
    }
}

// table in card
.table-in-card {
    padding: 0px 16px;

    .el-table--border {
        border: 1px solid rgba(22, 93, 255, 0.4);
    }
}

// text in card
.text-in-card {
    padding: 8px 16px;

    .text-row {
        display: flex;
        flex-direction: row;

        .label {
            width: 115px;
            text-align: right;
        }
    }
}

// normal grid header
.grid-header {
    background: var(--background-color-2) !important;

    .cell {
        line-height: 22px !important;
    }
}

// grid header when grid is in card
.grid-header-in-card {
    background: var(--background-color-3) !important;

    .cell {
        line-height: 22px !important;
    }
}

.table-link {
    color: var(--link-6);
    cursor: pointer;
}

.el-tabs__item.is-disabled {
    cursor: auto !important;
}

// table
.normal-table {
    .operate-btns {
        display: flex;
        justify-content: space-around;
    }
}

.search-form {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin: 8px;

    .search-time-range {
        width: 300px;
    }

    .filter {
        display: flex;
        align-items: center;
    }

    .statistics {
        font-size: 16px;
        line-height: 22px;
        font-weight: 600 !important;
    }

    .filter:not(:last-child) {
        margin-right: 15px;
    }

    .seperator {
        margin: auto;
    }

    .el-input {
        .el-button {
            border: none !important;
        }
    }
}

.search-form-multirow {
    .row {
        display: flex;
        justify-content: flex-end;
        align-items: center;

        .search-time-range {
            width: 300px;
        }

        .filter {
            display: flex;
            align-items: center;
        }

        .filter:not(:last-child) {
            margin-right: 15px;
        }

        .seperator {
            margin: auto;
        }

        margin-bottom: 10px;
    }

    margin-bottom: 10px;
}

.refresh-bar {
    &-container {
        position: absolute;
        right: 0px;
        top: 0px;
        display: flex;
        margin-bottom: 10px;
        justify-content: end;
        overflow: hidden;
        font-size: 12px;
    }

    &-filter {
        font-size: 12px;
        width: 600px;
        z-index: 10;
        padding-right: 16px;
        display: flex;
        align-items: center;
        padding: 0 10px;
        height: 30px;

        >div:not(:last-of-type),
        >span,
        >button {
            margin-right: 4px;
        }

        :deep(.el-button .el-icon svg) {
            color: var(--el-color-icon-refresh-color);
        }

        :deep(.el-select .el-input.is-focus .el-input__wrapper) {
            box-shadow: 0 0 0 1px var(--hw-primary-1, var(--hw-primary-1)) inset !important;
        }

        :deep(.el-select-dropdown__item.selected) {
            color: var(--el-color-tabbar-active) !important;
        }

        :deep(.el-range-editor.is-active) {
            box-shadow: 0 0 0 1px var(--hw-primary-1, var(--hw-primary-1)) inset !important;
        }
    }

    :deep(.el-range-input) {
        background-color: var(--el-bg-color);
    }

    :deep(.el-date-editor--datetimerange) {
        width: 100px;
        background-color: var(--el-bg-color);
    }
}

.refresh-button.el-button.el-button--primary {
    background-color: var(--button-1-background) !important;
    border: 1px solid var(--button-1-border) !important;
    color: var(--button-1-color) !important;
    padding: 5px !important;
}

.divider {
    height: 24px;
    width: 1px;
    margin: 0 8px !important;
    background-color: var(--el-color-divider-border-color);
}

.gap-row {
    margin-bottom: 16px;
}

.alert-table {
    border-radius: 2px;
    border: 1px solid #D9D9D9;
    margin-top: 8px;
}

.el-form-item:not(.is-required) > .el-form-item__label:before {
    content: '\00a0';
    margin-right: 6px !important;
}

.el-input.is-disabled .el-input__wrapper {
    background-color: var(--el-bg-color-disabled) !important;
}